#include "stdafx.h"

#include <cassert>

#include "FakeUnknown.h"

using namespace rt::Fakes;

/*** IUnknown methods ***/
HRESULT FakeUnknown::QueryInterface(REFIID riid, void** ppvObj)
{
	_queryInterfaceCalled = true;
	_queryInterfaceLastIID = riid;
	assert(ppvObj);
	*ppvObj = _queryInterfaceFakeResult;
	return _queryInterfaceFakeError;
}

ULONG FakeUnknown::AddRef()
{
	_addRefCalled = true;
	return _addRefFakeResult;
}
ULONG FakeUnknown::Release()
{
	_releaseCalled = true;
	return _releaseFakeResult;
}

